﻿using System.Runtime.InteropServices.ComTypes;
using System.Runtime.InteropServices;

namespace SilverlightViewport.Common.Interop
{
    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), 
    Guid("0000010E-0000-0000-C000-000000000046")]
    public interface IDataObject
    {
        [PreserveSig]
        int GetData([In, MarshalAs(UnmanagedType.LPArray)] FORMATETC[] pformatetcIn, [Out, MarshalAs(UnmanagedType.LPArray)] STGMEDIUM[] pRemoteMedium);
        [PreserveSig]
        int GetDataHere([In, MarshalAs(UnmanagedType.LPArray)] FORMATETC[] pFormatetc, [In, Out, MarshalAs(UnmanagedType.LPArray)] STGMEDIUM[] pRemoteMedium);
        [PreserveSig]
        int QueryGetData([In, MarshalAs(UnmanagedType.LPArray)] FORMATETC[] pFormatetc);
        [PreserveSig]
        int GetCanonicalFormatEtc([In, MarshalAs(UnmanagedType.LPArray)] FORMATETC[] pformatectIn, [Out, MarshalAs(UnmanagedType.LPArray)] FORMATETC[] pformatetcOut);
        [PreserveSig]
        int SetData([In, MarshalAs(UnmanagedType.LPArray)] FORMATETC[] pFormatetc, [In, MarshalAs(UnmanagedType.LPArray)] STGMEDIUM[] pmedium, [In] int fRelease);
        [PreserveSig]
        int EnumFormatEtc([In] uint dwDirection, [MarshalAs(UnmanagedType.Interface)] out IEnumFORMATETC ppenumFormatEtc);
        [PreserveSig]
        int DAdvise([In, MarshalAs(UnmanagedType.LPArray)] FORMATETC[] pFormatetc, [In] uint ADVF, [In, MarshalAs(UnmanagedType.Interface)] IAdviseSink pAdvSink, out uint pdwConnection);
        [PreserveSig]
        int DUnadvise([In] uint dwConnection);
        [PreserveSig]
        int EnumDAdvise([MarshalAs(UnmanagedType.Interface)] out IEnumSTATDATA ppenumAdvise);
    }
}
